"""
Signals relating to files.
"""
from django.dispatch import Signal

# Sent just before a file will be posted (after it's been approved and
# moderated; this can be used to modify the file (in place) with posting
# details or other such actions. If any receiver returns False the file will be
# discarded and a 403 (not allowed) response. This signal is sent at more or less
# the same time (just before, actually) as the File object's pre-save signal,
# except that the HTTP request is sent along with this signal.
file_will_be_posted = Signal(providing_args=["file", "request"])

# Sent just after a file was posted. See above for how this differs
# from the File object's post-save signal.
file_was_posted = Signal(providing_args=["file", "request"])

